package space.xxhui.javatts.entity;

import space.xxhui.javatts.base.constants.ProjResponseCode;

/**
 * @author HitvzByHui
 * date 2019-05-03
 */
public class ProjResponse<T> {
    /**
     * 是否存在异常
     */
    private boolean status;
    /**
     * 实际码
     */
    private int code;
    /**
     * 提示信息
     */
    private String message;
    /**
     * 返回的数据
     */
    private T data;

    public ProjResponse() {
    }

    public ProjResponse(T data) {
        this.status = true;
        this.code = ProjResponseCode.SUCCESS;
        this.message = "success";
        this.data = data;
    }

    public ProjResponse(boolean status, int code, String message, T data) {
        this.status = status;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
